import json
file = open("test.json","r",encoding="utf8")
dict1 = json.load(file)
file.close()

dict1["age"]= 45
file = open("test.json","w",encoding="utf8")
json.dump(dict1,file,ensure_ascii=False)
file.close()
